#!/usr/bin/env sh
# deprecated
#   EXEPATH="$0"
#   EXE="$(basename "$EXEPATH")"
#   RESOLVERS='@resolver4.opendns.com @resolver3.opendns.com @resolver2.opendns.com @resolver1.opendns.com'
#   
#   #_usage () {
#   #  if test "$1" "$2" "$3" ; then
#   #    >&2 echo "usage: $EXE $4"
#   #    exit 2
#   #  fi
#   #}
#   
#   #_usage "$#" -lt 1 "<scope>"
#   
#   #scope="$1" && shift
#   
#   _route () {
#   
#     case "$scope" in
#         public)
#   	  _public "$@"
#   	  ;;
#         private)
#   	  _private "$@"
#   	  ;;
#         *)
#   	  #_unknown_scope "$scope"
#   	  _public "$@"
#   	  ;;
#     esac
#   
#   }
#   
#   _public () {
#     #_usage "$#" -ne 0 "public"
#     for resolver in $RESOLVERS ; do
#       result="$(dig +short myip.opendns.com "$resolver")"
#       rc="$?"
#       if [ -n "$result" ] ; then
#         printf "%s\n" "$result"
#         exit "$rc"
#       fi
#     done
#     exit 103
#   }
#   
#   _private () {
#     #_usage "$#" -ne 0 "private"
#     ip address | grep 'inet ' | grep 'scope global' | grep '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}' -o | head -1
#     exit "$?"
#   }
#   
#   _unknown_scope () {
#     >&2 echo "Unknown scope: $1 | use 'public' or 'private'"
#     exit 3
#   }
#   
#   _route "$@"


curl cip.cc
echo 
echo -e "SEE Location:\thttps://www.qqzeng.com/ip/" 
echo -e "SEE Map:      \thttps://lbs.amap.com/tools/picker"
